package com.wangsd.api.controller;

import com.wangsd.api.service.HyPayService;
import com.wangsd.common.controller.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/pay")
public class PayController {
    @Autowired
    private HyPayService hyPayService;

    @PostMapping("/test")
    public AjaxResult test(String ciphertext, String encrypted) {
        Map map = hyPayService.h5Pay(ciphertext, encrypted);
        return AjaxResult.success(map);
    }
}
